<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>admin</title>
<link href="<?php echo ADMIN_THEME?>images/reset.css" rel="stylesheet" type="text/css" />
<link href="<?php echo ADMIN_THEME?>images/system.css" rel="stylesheet" type="text/css" />
<link href="<?php echo ADMIN_THEME?>images/main.css" rel="stylesheet" type="text/css" />
<link href="<?php echo ADMIN_THEME?>images/table_form.css" rel="stylesheet" type="text/css" />
<link href="<?php echo ADMIN_THEME?>images/dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<?php echo ADMIN_THEME?>js/jquery.min.js"></script>
<script language="javascript" src="<?php echo ADMIN_THEME?>js/dialog.js"></script>
</head>
<body>
<div class="subnav">
  <div class="content-menu ib-a blue line-x">
	<?php
	$a = isset($_GET['a']) && $_GET['a'] ? $_GET['a'] : 'index';
	foreach ($menu as $i=>$t) {
		$class = $a == $t[0] ? ' class="on"' : '';
		$span  = $i >= count($menu)-1  ? '' : '<span>|</span>';
		echo '<a href="' . purl('admin/' . $t[0]) . '" ' . $class . '><em>' . $t[1] . '</em></a>' . $span;
	}
	?>
	<span>|</span><a href="<?php echo purl('index/list');?>" target="_blank"><em>前台浏览</em></a>
  </div>
</div>
<div class="pad-lr-10">
<div class="table-list">
<form action="" method="post">
<table width="100%">
	<thead>
	<tr>
		<th width="20" align="left"></th>
		<th width="100" align="left">数据类型</th>
		<th align="left">调用说明</th>
	</tr>
    </thead>
    <tbody>
	<tr>
	  <td align="left"></td>
	  <td align="left">函数库引入方式</td>
	  <td align="left">
	  在自定义类库中引入function.php，方法如下：<br>
	  在文件/extensions/custom.php任意位置加入下面代码：<br>
	  include PLUGIN_DIR . 'taobaoke' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . 'function.php'; <br>
	  切记不能用记事本，否则整个网站无法正常显示。
	  </td>
	</tr>
	<tr>
	  <td align="left"></td>
	  <td align="left">商品类目调用</td>
	  <td align="left">
	  {php $data=get_taobao_cats($cid);}<br>
	  $cid：商品类目id，不传cid表示所有类目，如果存在子栏目就调用$data['list']。<br>
	  数据结构<br>
	  类目编号cid,是否是父栏目is_parent,栏目名称name,父栏目编号parent_cid,子栏目数组list
	  </td>
	</tr>
	<tr>
	  <td align="left"></td>
	  <td align="left">商品列表调用</td>
	  <td align="left">
	  {php $data=get_taobao_list($cid, $sort='commissionNum_desc', $pagesize=10, $page=1 ,$keyword=null, $start_price=0, $end_price=0);}
	  <br>
	  $cid：商品类目id，$sort：排序方式，$pagesize：分页数量，$page：当前页数，$keyword：搜索关键字（不参与搜索就不填写）。
	  <br>
	  $start_price：开始价格，$end_price：结束价格（起始价格.传入价格参数时,需注意起始价格和最高价格必须一起传入,并且 start_price <= end_price ）。
	  <br>
	  排序参数介绍：<br>default price_desc(价格从高到低) <br>price_asc(价格从低到高) <br>credit_desc(信用等级从高到低) <br>commissionRate_desc(佣金比率从高到低) <br>commissionRate_asc(佣金比率从低到高) <br>commissionNum_desc(成交量成高到低)<br> commissionNum_asc(成交量从低到高)<br> commissionVolume_desc(总支出佣金从高到低)<br> commissionVolume_asc(总支出佣金从低到高)<br> delistTime_desc(商品下架时间从高到低) <br>delistTime_asc(商品下架时间从低到高)  <br>数据结构：<br>
	  商品编号num_iid,标题title,卖家昵称nick,图片地址pic_url,价格price,推广地址click_url,淘宝客佣金commission,淘宝客佣金比率commission_rate,累计成交量commission_num,累计总支出佣金量commission_volume,店铺推广地址shop_click_url,信用等级seller_credit_score,地区item_location,交易量volume
	  </td>
	</tr>
	<tr>
	  <td align="left"></td>
	  <td align="left">商品数据调用</td>
	  <td align="left">
	  {php $data=get_taobao_item($id);}<br>
	  $id：商品id.<br>
	  数据结构：<br>商品编号num_iid,标题title,卖家昵称nick,类目编号cid,商品描述desc,图片地址pic_url,数量num,地区location,价格price,商品推广地址click_url,店铺推广地址shop_click_url,信用等级seller_credit_score
	  </td>
	</tr>
	<tr height="25">
	  <td colspan="9" align="left">
      截止<?php echo date('Y-m-d H:i:s')?> 共有<?php echo $cachesize;?>缓存数据。<input type="submit" class="button" value=" 清空缓存 " name="submit"> 
      </td>
	  </tr>
	<tr>
	<td>      
	</tbody>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
